export default class orc_sound extends Laya.Script {
    public static base_sound_url:string = 'res/sounds/';
    /**
     * 播放音乐
     * @param url: 播放地址
     * @param loop: 是否循环
    */
    public static play_music(url:string,loop:boolean)
    {
        url = this.base_sound_url + url;
        Laya.SoundManager.playMusic(url,0);        
    }

     /**
     * 停止音乐    
     */
    public static stop_music(){        
        Laya.SoundManager.stopMusic();
    } 

    /**
     * 播放音效
     * @param url: 播放地址
    */
    public static play_effect(url:string)
    {       
        url = this.base_sound_url + url;
        Laya.SoundManager.playSound(url,1);                 
    }
}